<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    {if $auth->city_id == 0}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">城市:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-city_id" data-rule="required" data-source="general/lihua_city/index" data-order-by="weigh desc" class="form-control selectpage" name="row[city_id]" type="text" value="">
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required;length(~50)" class="form-control" name="row[title]" type="text" value="">
        </div>
    </div>

    <div class="form-group">
        <label for="c-images" class="control-label col-xs-12 col-sm-2">图片:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" data-rule="required" class="form-control" size="50" name="row[pic]" type="text" readonly value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg" data-url="xajax/uppic/group/slide" data-maxsize="10M" data-multiple="false" data-preview-id="p-images"><i class="fa fa-upload"></i> 上传</button></span>
                </div>
                <span class="msg-box n-right" for="c-pics"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[start_date]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[end_date]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-url" data-rule="length(~200)" class="form-control" name="row[url]" type="text" placeholder="若要跳转到第三方链接则填写" value="">
        </div>
    </div>
    <div class="form-group">
        <label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>

    <div class="form-group layer-footer">
        <div class="col-xs-12 text-center">
            <button type="submit" class="btn btn-success btn-embossed disabled">提交</button>
            <button type="button" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">关闭</button>
        </div>
    </div>
</form>
